//
//  AddTypeBillCell.swift
//  KaMengApplication
//
//  Created by DUONIU_MAC on 2018/11/2.
//  Copyright © 2018年 DUONIU_MAC. All rights reserved.
//

import UIKit

class AddTypeBillCell: UICollectionViewCell {

    let titleLabel = UILabel()
    let contextLabel = UILabel()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        titleLabel.font = UIFont.systemFont(ofSize: RATIO(maxNum: 20))
        self.contentView.addSubview(titleLabel)
        
        contextLabel.textColor = UIColor.gray
        contextLabel.font = UIFont.systemFont(ofSize: RATIO(maxNum: 14))
        contextLabel.numberOfLines = 2
        contextLabel.adjustsFontSizeToFitWidth = true
        self.contentView.addSubview(contextLabel)
        
        titleLabel.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(RATIO_H(maxNum: 10))
            make.width.greaterThanOrEqualTo(10)
            make.left.equalToSuperview().offset(RATIO(maxNum: 10))
            make.height.equalTo(RATIO_H(maxNum: 30))
        }
        
        contextLabel.snp.makeConstraints { (make) in
            make.top.equalTo(titleLabel.snp.bottom)
            make.left.equalTo(titleLabel)
            make.right.equalToSuperview().offset(RATIO(maxNum: -10))
            make.height.equalTo(RATIO_H(maxNum: 40))
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
